package com.ruoyi.comn.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.comn.mapper.SrmSupplierMapper;
import com.ruoyi.comn.domain.SrmSupplier;
import com.ruoyi.comn.service.ISrmSupplierService;

/**
 * 供应商管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-19
 */
@Service
public class SrmSupplierServiceImpl implements ISrmSupplierService 
{
    @Autowired
    private SrmSupplierMapper srmSupplierMapper;

    /**
     * 查询供应商管理
     * 
     * @param supplierUuid 供应商管理主键
     * @return 供应商管理
     */
    @Override
    public SrmSupplier selectSrmSupplierBySupplierUuid(String supplierUuid)
    {
        return srmSupplierMapper.selectSrmSupplierBySupplierUuid(supplierUuid);
    }

    /**
     * 查询供应商管理列表
     * 
     * @param srmSupplier 供应商管理
     * @return 供应商管理
     */
    @Override
    public List<SrmSupplier> selectSrmSupplierList(SrmSupplier srmSupplier)
    {
        return srmSupplierMapper.selectSrmSupplierList(srmSupplier);
    }

    /**
     * 新增供应商管理
     * 
     * @param srmSupplier 供应商管理
     * @return 结果
     */
    @Override
    public int insertSrmSupplier(SrmSupplier srmSupplier)
    {
        srmSupplier.setCreateTime(DateUtils.getNowDate());
        return srmSupplierMapper.insertSrmSupplier(srmSupplier);
    }

    /**
     * 修改供应商管理
     * 
     * @param srmSupplier 供应商管理
     * @return 结果
     */
    @Override
    public int updateSrmSupplier(SrmSupplier srmSupplier)
    {
        srmSupplier.setUpdateTime(DateUtils.getNowDate());
        return srmSupplierMapper.updateSrmSupplier(srmSupplier);
    }

    /**
     * 批量删除供应商管理
     * 
     * @param supplierUuids 需要删除的供应商管理主键
     * @return 结果
     */
    @Override
    public int deleteSrmSupplierBySupplierUuids(String[] supplierUuids)
    {
        return srmSupplierMapper.deleteSrmSupplierBySupplierUuids(supplierUuids);
    }

    /**
     * 删除供应商管理信息
     * 
     * @param supplierUuid 供应商管理主键
     * @return 结果
     */
    @Override
    public int deleteSrmSupplierBySupplierUuid(String supplierUuid)
    {
        return srmSupplierMapper.deleteSrmSupplierBySupplierUuid(supplierUuid);
    }
}
